/**
 * amis v6.13.0
 * build time: 2025-08-12
 * Copyright 2018-2025 baidu
 */

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var _Spinner = require('amis-ui/lib/components/Spinner');
var tslib = require('tslib');
var amisCore = require('amis-core');
var React = require('react');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var _Spinner__default = /*#__PURE__*/_interopDefaultLegacy(_Spinner);
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);

var __react_jsx__ = require('react');
var _J$X_ = (__react_jsx__["default"] || __react_jsx__).createElement;
var _J$F_ = (__react_jsx__["default"] || __react_jsx__).Fragment;


;var SpinnerRenderer = /** @class */function (_super) {
  tslib.__extends(SpinnerRenderer, _super);
  function SpinnerRenderer() {
    return _super !== null && _super.apply(this, arguments) || this;
  }
  SpinnerRenderer.prototype.renderBody = function () {
    var _a = this.props,
      body = _a.body,
      render = _a.render;
    return body ? render('body', body) : null;
  };
  SpinnerRenderer.prototype.render = function () {
    var _a = this.props,
      cx = _a.classnames,
      spinnerWrapClassName = _a.spinnerWrapClassName,
      body = _a.body,
      rest = tslib.__rest(_a, ["classnames", "spinnerWrapClassName", "body"]);
    return body ? _J$X_("div", {
      className: cx("Spinner-wrap", spinnerWrapClassName)
    }, _J$X_(_Spinner__default["default"], tslib.__assign({}, rest)), this.renderBody()) : _J$X_(_Spinner__default["default"], tslib.__assign({}, rest));
  };
  SpinnerRenderer = tslib.__decorate([amisCore.Renderer({
    type: 'spinner'
  })], SpinnerRenderer);
  return SpinnerRenderer;
}(React__default["default"].Component);

exports.SpinnerRenderer = SpinnerRenderer;
